<?php
foreach ($imagen_data->result() as $fila){
    $name_pic = $fila->name_img;
    $source_image = 'web/img/mini/';
    
    $image_properties = array(
        'src' => $source_image.$name_pic ,
        'alt' => $name_pic,
        'style' => 'width : 120px; height: 120px;',
        'title' => $name_pic,
        'class' => 'img-polaroid',
        );
?>
<li>
    <a href="#" class="thumbnail">
        <?php if(!empty($name_pic)): echo img($image_properties);endif;?>
    </a>
</li>
<?php
}
?>